package com.redis;

import javax.annotation.Resource;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisClient {

	private RedisTemplate<Object, Object> redisTemplate;

	@Resource
	public void setRedisTemplate(RedisTemplate<Object, Object> redisTemplate) {
		this.redisTemplate = redisTemplate;
	}

	public void set(String key, Object value) {
		redisTemplate.opsForValue().set(key, value);
	}
	


}
